import { provide, shallowRef ,h} from "vue"

export function tables(){


    const tablex =[
        {
            path:"1",
            com:()=>import("./components/HelloWorld.vue")
        },
        {
    
            path:"2",
            com:()=>import("./components/HelloWorld2.vue")
        }]

    let views=[]

    for (let item of tablex){
        
        item.com().then(
            re=>{
                //console.log(re)
                views.push(re)
            }
        )

    }
    let v = shallowRef(h("div","你好！"))
    //provide("views", 1)
    return {
        list:views,
        index:0,
        push:()=>{console.log("你好啊")},
        v:shallowRef(`
            <template>xxx</template>
        `)
    }

} 
export let  router = tables()


